package com.kfm.wiki.controller;

import com.kfm.wiki.socket.WebSocketServer;
import com.kfm.wiki.util.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class TestContoller {

    @GetMapping("/hello")
    public String hello(){
        return "Hello World- kfm";
    }


    @GetMapping("/socket")
    public R sendMsg(){
        WebSocketServer.sendMsg("hello");
        return R.ok();
    }
}
